package com.oig.base.api.factory;

import com.oig.base.api.HarborService;
import com.oig.base.api.fallback.HarborServiceFallBackImpl;
import org.springframework.cloud.openfeign.FallbackFactory;

public class HarborServiceFallBackFactory implements FallbackFactory<HarborService> {

    @Override
    public HarborService create(Throwable cause) {
        HarborServiceFallBackImpl harborServiceFallBack = new HarborServiceFallBackImpl();
        harborServiceFallBack.setCause(cause);
        return harborServiceFallBack;
    }
}
